namespace dPet.Infrastructure.EntityFramework.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class UpdateModel2 : DbMigration
    {
        public override void Up()
        {
            DropForeignKey("dbo.ServiceItemSKU", "ServiceItem_Id", "dbo.ServiceItem");
            DropIndex("dbo.ServiceItemSKU", new[] { "ServiceItem_Id" });
            AlterColumn("dbo.ServiceItemSKU", "ServiceItem_Id", c => c.String(nullable: false, maxLength: 32));
            CreateIndex("dbo.ServiceItemSKU", "ServiceItem_Id");
            AddForeignKey("dbo.ServiceItemSKU", "ServiceItem_Id", "dbo.ServiceItem", "Id", cascadeDelete: true);
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.ServiceItemSKU", "ServiceItem_Id", "dbo.ServiceItem");
            DropIndex("dbo.ServiceItemSKU", new[] { "ServiceItem_Id" });
            AlterColumn("dbo.ServiceItemSKU", "ServiceItem_Id", c => c.String(maxLength: 32));
            CreateIndex("dbo.ServiceItemSKU", "ServiceItem_Id");
            AddForeignKey("dbo.ServiceItemSKU", "ServiceItem_Id", "dbo.ServiceItem", "Id");
        }
    }
}
